package io.github.rascaler.dcenter.config;

import io.github.rascaler.dcenter.message.DefaultErrorMessageManager;
import io.github.rascaler.dcenter.message.PropertiesErrorMessageLoader;
import io.github.rascaler.dcenter.properties.CambrianExceptionProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName CambrianExceptionConfig
 * @Description TODO
 * @Author wurenqing
 * @Date 2022/7/5 15:28
 */

//@EnableConfigurationProperties(CambrianExceptionProperties.class)
@Configuration
public class CambrianExceptionConfig {
    @Bean
    public PropertiesErrorMessageLoader getPropertiesMessageLoader() {
        return new PropertiesErrorMessageLoader();
    }

    @Bean(name="defaultErrorMessageManager", initMethod = "init")
    public DefaultErrorMessageManager getDefaultMessageManager() {
        return new DefaultErrorMessageManager();
    }
}
